﻿using System;
using System.Drawing;
using System.IO;
using System.Text;

namespace Steganograf
{
    class ByteArray
    {
        public static byte[] Concatenate(byte[] pArrayA, byte[] pArrayB)
        {
            byte[] myReturn = new byte[pArrayA.Length + pArrayB.Length];

            for (int i = 0; i < pArrayA.Length; i++)
                myReturn[i] = pArrayA[i];

            for (int i = 0; i < pArrayB.Length; i++)
                myReturn[i + pArrayA.Length] = pArrayB[i];

            return myReturn;
        }

        public static Image ToImage(byte[] pByteArray)
        {
            MemoryStream ms = new MemoryStream(pByteArray);
            Image returnImage = Image.FromStream(ms);
            return returnImage;
        }
    }
}
